package cn.wzptsoft.mall.pojo.vo;

import cn.wzptsoft.mall.pojo.Sku;
import cn.wzptsoft.mall.pojo.Spu;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SpuInfoVo {
    private Integer id;
    private String  title;
    private String  description;
    private String  img;
    private Boolean onsale;
    private String price;
    private String discountPrice;
    private String tags;
    private List<SkuVo> skus;


    public SpuInfoVo(Spu spu){
        this.id=spu.getId();
        this.title=spu.getTitle();
        this.description=spu.getDescription();
        this.img=spu.getImg();
        this.price=spu.getPrice();
        this.discountPrice=spu.getPrice();
        this.tags=spu.getTags();

    }
}
